﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FreedomERP.Comm;
using FreedomERP.Models;
using FreedomERP.Models.Bd;

namespace FreedomERP.Dao.Bd
{
    /// <summary>
    /// 商品，库存管理数据库接口
    /// 作者：陈新杰
    /// </summary>
    interface IBdProductDao
    {
        /// <summary>
        /// 获取商品信息，如果参数为空，则该参数不参与查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fOrgunited"></param>
        /// <param name="fNumber"></param>
        /// <param name="fName"></param>
        /// <param name="fModelId"></param>
        /// <param name="fUnitId"></param>
        /// <param name="fReMark"></param>
        /// <param name="fStatusId"></param>
        /// <param name="fFromQty"></param>
        /// <param name="fEndQty"></param>
        /// <param name="fProdInvStatusName"></param>
        /// <param name="start"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        DAOResult<BdProduct> getProducts(String fId, String fOrgunited, String fNumber, String fName, String fModelId, String fUnitId, String fReMark, String fStatusId, String fFromQty, String fEndQty, String fProdInvStatusName,String sortColumn,Boolean isASC, int start, int limit, out int totalCount);

        /// <summary>
        /// 获取商品信息，如果参数为空，则该参数不参与查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fOrgunited"></param>
        /// <param name="fNumber"></param>
        /// <param name="fName"></param>
        /// <param name="fModelId"></param>
        /// <param name="fUnitId"></param>
        /// <param name="fReMark"></param>
        /// <param name="fStatusId"></param>
        /// <param name="fFromQty"></param>
        /// <param name="fEndQty"></param>
        /// <param name="fProdInvStatusName"></param>
        /// <param name="start"></param>
        /// <param name="limit"></param>
        /// 
        /// <returns></returns>
        DAOResult<ProductInfo> getProductInfos(String fId, String fOrgunited, String fNumber, String fName, String fModelId, String fUnitId, String fReMark, String fStatusId, String fFromQty, String fEndQty, String fProdInvStatusName, String sortColumn, Boolean isASC, int start, int limit, out int totalCount);

        /// <summary>
        /// 保存产品信息
        /// </summary>
        /// <param name="product"></param>
        /// <returns></returns>
        DAOResult<String> saveOrUpdateProductInfo(ProductInfo productinfo, String fAccountId);

        /// <summary>
        /// 根据产品Id将其产品信息状态改为无效
        /// </summary>
        /// <param name="productId"></param>
        /// <returns></returns>
        DAOResult<BdProduct> deleteProduct(String productId);

        /// <summary>
        /// 根据产品FNumber获取产品信息
        /// </summary>
        /// <param name="FNumber"></param>
        /// <author>梁建东</author>
        /// <returns></returns>
        ProductInfo GetProductMsgByFNumber(String FNumber);

        /// <summary>
        /// 根据FId获取产品
        /// </summary>
        /// <param name="FId"></param>
        /// <author>姚少鹏</author>
        /// <returns></returns>
        BdProduct getProductByFId(String FId);

        /// <summary>
        /// 根据产品类型获取产品信息
        /// </summary>
        /// <param name="FType"></param>
        /// <author>姚少鹏</author>
        /// <returns></returns>
        List<ProductInfo> getProductInfoByFType(String FType);
    }
}
